home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
A-COMAL Series
/
(k)aac.d64
/
roads'main.l
< prev
next >
Wrap
Text File
|
2007-02-28
|
564b
|
23 lines
0010 PRINT CHR$(147),CHR$(14),
0020 PRINT "├ONVERSION OF A NUMBER."
0030 DIM RES$ OF 80 // ╘HIS STRING WILL
0040 // CONTAIN THE RESULT OF THE CONVERSION
0050 FLAG:=TRUE // ╞LAG TO RECOGNIZE
0060 // INCORRECT INPUT
0070 REPEAT
0080 PRINT
0090 IF FLAG=FALSE THEN
0100 PRINT "┼RROR! ┴GAIN"
0110 ENDIF
0120 INPUT "╬UMBER ?": NUMBER
0130 INPUT "╔N ┬ASE ?": BASE#
0140 FLAG:=FALSE
0150 UNTIL BASE#>1 AND BASE#<37
0160 IF NUMBER<0 THEN
0170 NUMBER:=ABS(NUMBER)
0180 RES$:="-"
0190 ENDIF
0200 CONVERT(NUMBER,BASE#,RES$)
0210 PRINT
0220 PRINT RES$